package com.formiaomiao.demain.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.formiaomiao.demain.db.IsPushBean;
import com.formiaomiao.demain.db.MsgBean;

import com.formiaomiao.demain.greendao.IsPushBeanDao;
import com.formiaomiao.demain.greendao.MsgBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig isPushBeanDaoConfig;
    private final DaoConfig msgBeanDaoConfig;

    private final IsPushBeanDao isPushBeanDao;
    private final MsgBeanDao msgBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        isPushBeanDaoConfig = daoConfigMap.get(IsPushBeanDao.class).clone();
        isPushBeanDaoConfig.initIdentityScope(type);

        msgBeanDaoConfig = daoConfigMap.get(MsgBeanDao.class).clone();
        msgBeanDaoConfig.initIdentityScope(type);

        isPushBeanDao = new IsPushBeanDao(isPushBeanDaoConfig, this);
        msgBeanDao = new MsgBeanDao(msgBeanDaoConfig, this);

        registerDao(IsPushBean.class, isPushBeanDao);
        registerDao(MsgBean.class, msgBeanDao);
    }
    
    public void clear() {
        isPushBeanDaoConfig.clearIdentityScope();
        msgBeanDaoConfig.clearIdentityScope();
    }

    public IsPushBeanDao getIsPushBeanDao() {
        return isPushBeanDao;
    }

    public MsgBeanDao getMsgBeanDao() {
        return msgBeanDao;
    }

}
